Skip to content

Make meteonorm remote_data tests robust to data changes#2810

Open
maschwanden wants to merge 1 commit into
pvlib:mainfrom
maschwanden:meteonorm-tests-robust-to-data-changes
Open

Make meteonorm remote_data tests robust to data changes#2810
maschwanden wants to merge 1 commit into
pvlib:mainfrom
maschwanden:meteonorm-tests-robust-to-data-changes

Conversation

@maschwanden

@maschwanden maschwanden commented Jul 6, 2026

Copy link
Copy Markdown
  • I am familiar with the contributing guidelines
  • Tests added
  • Updates entries in docs/sphinx/source/reference for API changes.
  • Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

@AdamRJensen asked the Meteonorm team to fix the recurring failing CI pipeline problem. In this PR we suggest a permanent fix for the problem.

The meteonorm iotools tests pinned specific values, the full column list, and exact column counts returned by the live API. Meteonorm regularly updates their weather dataset and adds parameters to the 'all' set, neither of which is a breaking API change, but both cause these tests to fail spuriously (e.g. new 'surface_tilt'/'surface_azimuth' columns broke the exact-list assertion).

Assert only what pvlib controls, not what meteonorm's dataset controls:

  • realtime: check the known columns are a subset of the response and that the column count is at least as large, instead of exact equality.
  • training/tmy: drop the golden-value assert_frame_equal comparisons (and their fixtures); check columns, numeric dtype, and that at most 20% of values are NaN (the guarantee meteonorm provides).

Row counts and index checks are kept since they are determined by the requested time range, not the dataset.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Hey @maschwanden! 🎉

Thanks for opening your first pull request! We appreciate your
contribution. Please ensure you have reviewed and understood the
contributing guidelines.

If AI is used for any portion of this PR, you must vet the content
for technical accuracy.

@IoannisSifnaios

IoannisSifnaios commented Jul 6, 2026

Copy link
Copy Markdown
Member

Hi @maschwanden, can you please add this list to your PR (before the description you worte):

https://github.com/pvlib/pvlib-python/blob/main/.github/PULL_REQUEST_TEMPLATE.md?plain=1

It is just for us to follow the status of the PR more easily! Thanks!

@maschwanden

Copy link
Copy Markdown
Author

Hi @IoannisSifnaios, I intentionally left it out because most items are not relevant to my PR (It says Feel free to remove checklist items that are not relevant to your change. in the template).

I added it now with all entries except for the Closes #xxxx which makes no sense at all.

@cwhanse

cwhanse commented Jul 6, 2026

Copy link
Copy Markdown
Member

Thanks @maschwanden would you like to add yourself to the list of contributors, in this file? You can also add a note in the Testing section, but I think that's optional.

The meteonorm iotools tests pinned specific values, the full column
list, and exact column counts returned by the live API. Meteonorm
regularly updates their weather dataset and adds parameters to the
'all' set, neither of which is a breaking API change, but both cause
these tests to fail spuriously (e.g. new
'surface_tilt'/'surface_azimuth'
columns broke the exact-list assertion).

Assert only what pvlib controls, not what meteonorm's dataset controls:

- realtime: check the known columns are a subset of the response and
  that the column count is at least as large, instead of exact equality.
- training/tmy: drop the golden-value assert_frame_equal comparisons
  (and their fixtures); check columns, numeric dtype, and that at most
  20% of values are NaN (the guarantee meteonorm provides).

Row counts and index checks are kept since they are determined by the
requested time range, not the dataset.
@maschwanden maschwanden force-pushed the meteonorm-tests-robust-to-data-changes branch from 9754226 to 9d27253 Compare July 7, 2026 12:23
@maschwanden

Copy link
Copy Markdown
Author

Thanks for the review @cwhanse !

Thanks @maschwanden would you like to add yourself to the list of contributors, in this file? You can also add a note in the Testing section, but I think that's optional.

I added myself to the contributors file. Thanks for reminding me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants